package com.yanqu.road.logic.pb;

import com.yanqu.road.entity.player.UserBaseInfo;
import com.yanqu.road.pb.monopoly.MonopolyProto;
import com.yanqu.road.pb.player.PlayerProto;

public class DaFuWengPb {

    /**
     * 用户信息
     */
    public static MonopolyProto.MonopolyPlayerMsg parseMonopolyPlayerMsg(long userId, UserBaseInfo userBaseInfo) {
        MonopolyProto.MonopolyPlayerMsg.Builder builder = MonopolyProto.MonopolyPlayerMsg.newBuilder();
        builder.setPlayer(PlayerBasePb.parsePlayerBaseTempMsg(userBaseInfo));
        builder.setUserId(userId);
        return builder.build();
    }

    /**
     * 用户信息
     */
    public static MonopolyProto.MonopolyPlayerMsg parseMonopolyPlayerMsg(long userId, PlayerProto.PlayerBaseTempMsg playerBaseTempMsg) {
        MonopolyProto.MonopolyPlayerMsg.Builder builder = MonopolyProto.MonopolyPlayerMsg.newBuilder();
        builder.setPlayer(playerBaseTempMsg);
        builder.setUserId(userId);
        return builder.build();
    }

}
